package api

import (
	"fmt"
	"gin-web/app/model"
	"gin-web/library/global"
	"github.com/gin-gonic/gin"
)

var User =  userApi{}
type userApi struct {}

func (*userApi) User(c *gin.Context)  {
	value, ok := c.Get("loginUser")
	if ok {
		loginUser := value.(*model.User)
		fmt.Println(loginUser)
	}
	global.OkWithData(c, value)
}